<template>
	<view class="GrabDetails">
		<view class="top">
			<text>抢单编号：{{orderdata.order_number}}</text>
			<text>{{orderdata.staName}}</text>
		</view>
		<view class="line">
			<text>申请时间</text>
			<text>{{orderdata.create_time}}</text>
		</view>
		<view class="line">
			<text>申请额度</text>
			<text>{{orderdata.money}} {{orderdata.money_currency_code}}</text>
		</view>
		<view class="line">
			<text>产生收益</text>
			<text>{{orderdata.profit}} {{orderdata.profit_currency_code}}</text>
		</view>
		<view class="line">
			<text>收益天数</text>
			<text>{{orderdata.today}}</text>
		</view>
		<view class="line">
			<text>收益开始时间</text>
			<text v-if="orderdata.profit_time">{{orderdata.profit_time}}</text>
			<text v-else >- -</text>
		</view>
		<view class="line">
			<text>收益结束时间</text>
			<text v-if="orderdata.finish_time">{{orderdata.finish_time}}</text>
			<text v-else >- -</text>
		</view>
		<view class="line">
			<text>提出时间</text>
			<text v-if="orderdata.withdraw_time">{{orderdata.withdraw_time}}</text>
			<text v-else >- -</text>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderdata: []
			};
		},
		onLoad: function(option) {
			//获取路由传值
			this.getData(option.id);
		},
		methods: {
			getData: function(orderid) {
				//抢单详情
				const data = {
					oid: orderid
				}
				this.$request.post("/api/ucenter/getOrderDetail", {
						data: data
					})
					.then(res => {
						if (res.data.code == 1) {
							this.orderdata = res.data.data.order;
						}
					})
					.catch(error => {
						console.error('error:', error);
					});
			}
		}
	}
</script>

<style lang="less">
	.GrabDetails {
		font-size: 16px;
		width: 100%;
		padding: 0 20px;
		border-top: 5px solid #F1F1F1;

		.top {
			display: flex;
			height: 80px;
			align-items: center;
			justify-content: space-between;
		}

		.line {
			display: flex;
			height: 60px;
			align-items: center;
			justify-content: space-between;
			border-bottom: 1px solid #F1F1F1;
			font-size: 13px;
			color: #666;
		}
	}
</style>
